home *** CD-ROM | disk | FTP | other *** search
/ Inventor Labs: Technology / INVENTORLABS_TECHNOLOGY.BIN / mac / FILES / SHARED.CST / 00501_Script_pano movie handlers < prev    next >
Text File  |  1997-07-24  |  3KB  |  74 lines

  1. -- SetPanoNode
  2. --      pNodeID is the number of the node to go to
  3. --      pUpdate is true if a screen update is to be performed
  4. --      [pQuality] is the quality level at which to display the update
  5. --
  6. -- Changes the current node as specified.  If pUpdate is true, updates the
  7. -- screen to reflect that node's default view.  Has the side effect of changing
  8. -- the current quality level to pQuality, if specified.
  9. -------------------------------------------------------------------------------
  10. on SetPanoNode pNodeID, pUpdate, pQuality
  11.   global gQTVRInstance
  12.   if IsQTVRMovie(gQTVRInstance) then
  13.     QTVRSetNodeID(gQTVRInstance, integer(pNodeID))
  14.     if not voidP(pQuality) then QTVRSetQuality(gQTVRInstance, pQuality)
  15.     if pUpdate then QTVRUpdate(gQTVRInstance) 
  16.   end if
  17. end
  18.  
  19.  
  20. --=============================================================================
  21. -- SwingPanoMovie
  22. --      pHPan is the destination horizontal pan angle
  23. --      pVPan is the destination vertical pan angle
  24. --      pZoom is the destination zoom angle
  25. --      pSwingSpeed is the speed at which to swing
  26. --      pSwingQuality is the quality at which to swing
  27. --      pFinalQuality is the quality at which to re-update the destination view
  28. --
  29. -- Swings the view around to a specified direction.  Has the side effect of
  30. -- changing the current quality level to pFinalQuality
  31. -------------------------------------------------------------------------------
  32. on SwingPanoMovie pHPan, pVPan, pZoom, pSwingSpeed, pSwingQuality, pFinalQuality
  33.   global gQTVRInstance
  34.   if IsQTVRMovie(gQTVRInstance) then
  35.     -- Set up the destination pan and zoom angles
  36.     QTVRSetFOV(gQTVRInstance,pZoom)
  37.     QTVRSetTiltAngle(gQTVRInstance,pVPan)
  38.     QTVRSetPanAngle(gQTVRInstance,pHPan)
  39.     
  40.     -- For performance, you can use lower quality during the swing
  41.     QTVRSetQuality(gQTVRInstance, pSwingQuality)
  42.     QTVRSetTransitionMode(gQTVRInstance, "swing")
  43.     QTVRSetTransitionSpeed(gQTVRInstance, pSwingSpeed)
  44.     QTVRUpdate(gQTVRInstance) 
  45.     
  46.     -- Set transition mode to normal
  47.     QTVRSetTransitionMode(gQTVRInstance, "normal")
  48.     
  49.     -- Only do a reupdate if the quality values are different
  50.     if pFinalQuality <> pSwingQuality then
  51.       QTVRSetQuality(gQTVRInstance, pFinalQuality)
  52.       QTVRUpdate(gQTVRInstance) 
  53.     end if
  54.   end if
  55. end
  56.  
  57.  
  58. --=============================================================================
  59. -- CollapsePanoMovie
  60. --
  61. -- Collapses to the currently selected hot spot.
  62. -- Mac only
  63. -------------------------------------------------------------------------------
  64. on CollapsePanoMovie
  65.   global gQTVRInstance
  66.   
  67.   -- Make sure we're on a mac before trying this
  68.   if the machineType <> 256 then
  69.     
  70.     if IsQTVRMovie(gQTVRInstance) then
  71.       QTVRCollapseToHotSpotRgn(gQTVRInstance)
  72.     end if
  73.   end if
  74. end